#include <iostream>
#include <thread>

#include <unistd.h>

void threadrun()
{
    while (true)
    {
        std::cout << "I am a new thread for C++" << std::endl;
        sleep(1);
    }
}

int main()
{
    std::thread t(threadrun);

    t.join();

    return 0;
}